Repository navigation
(PART 2) Renames old livekit-uniffi builds to use ffi instead post livekit-ffi / livekit-uniffi merge - #1439
Conversation
6ad2d1e to
f64b31c
Compare
Changeset ✓This PR includes a changeset covering all affected packages:
|
|
@pblazej Per #1438 (review), can you give me an approval on the PR so I can merge the whole stack at once? |
There was a problem hiding this comment.
Devin Review found 1 potential issue.
2 flags not posted on this PR by your GitHub settings — view them in Devin Review. (Configure)
| SPM_NAME = "LiveKitUniFFI" | ||
| DART_PACKAGE_NAME = "livekit_uniffi" | ||
| SPM_NAME = "LiveKitFFI" | ||
| DART_PACKAGE_NAME = "livekit_ffi" |
There was a problem hiding this comment.
🔴 First Dart release cannot publish
When a release first publishes livekit_ffi, the automated pub.dev publish fails. The manual first publish and automated-publishing settings for livekit_uniffi do not carry over to the new package.
Learn more
The package name in the generated pubspec comes from DART_PACKAGE_NAME via the pubspec template. The release job immediately runs dart pub publish --force for that name. pub.dev's initial manual publish and automated publishing configuration belong to an individual package identity; the workflow's bootstrap note describes the old package, not the new one. Without a manual first version and new automated publishing setup, the first tag-push publication cannot succeed.
Example: A tag for version 0.12.83 generates name: livekit_ffi. The release job authenticates through OIDC and tries to publish that package, but pub.dev has only been set up to automate livekit_uniffi; the new package is not published.
Recommended fix: Bootstrap livekit_ffi with a manual first publication, configure its own pub.dev automated publishing for livekit-ffi/v{{version}}, and update the workflow's bootstrap instructions before enabling the new package's automated release.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
@hiroshihorie Do you think it's worth creating a new pub.dev package called livekit_ffi here, or should I keep the package name in this one spot livekit_uniffi?
There was a problem hiding this comment.
I think its fine to create a new one 🙂
pblazej
left a comment
There was a problem hiding this comment.
Would be great if you monitor the CI for a while 🧨
f64b31c to
24b8f51
Compare
…fi` with `room-apis` and`core-modules` modes (#1438) ## Background Ever since we [introduced livekit-uniffi](#750) at the start of 2026, it has been getting increasingly confusing what the difference between `livekit-ffi` (existing C ABI ffi solution used by python, node, unity, and c++ sdks that exposes a full rust owned webrtc stack) and `livekit-uniffi` (new uniffi powered ffi solution used by swift, android, and flutter that exposes utility modules) actually are to those that haven't been intimately involved with the rust adoption initiative. This has become even more confusing now that we have recently [added uniffi to the livekit-ffi crate](#1308)... 😬 The original intention was that `livekit-uniffi` would be a somewhat transitional "playground" we could use to experiment with uniffi and make sure we were ready to commit to it before moving everything wholesale over to it. We're now at the point where we're ready to commit to it, so this change aims to consolidate all FFI usage (both C ABI FFI and uniffi flavors) into one monolithic `livekit-ffi` crate again. ## Overview Moves all code from `livekit-uniffi` into `livekit-ffi` and **outright removes** the `livekit-uniffi` crate. This implements "phase 3" of the C ABI -> uniffi migration plan document discussed last month. `livekit-ffi` now has two top level "modes" controlled by features: - The `room-apis` mode is exactly what `livekit-ffi` used to be - the C ABI ffi stack using the `livekit` crate that manages a full webrtc stack. This build is still built in ci exactly as it was before, and consumed by python/node/unity/c++. - The `core-modules` mode ie exactly what `livekit-uniffi` used to be - the newer uniffi exposed set of utilities which are consumed by the swift, android, and flutter sdks. ## Common functionality As we migrate the `room-apis` mode to fully use uniffi, there will inevitably be bits and pieces we want to expose to both "modes". This pull request surfaced one initial candidate - the `build_version` function. This was exposed identically in both old uniffi implementations so now this is defined once and not gated by either "mode". ## Backwards compatibility This pull request _should_ be fully backwards compatible. That means in practice that "core modules" builds will still include identifiers within that mention `uniffi` - ie, `LiveKitUniFFI` in swift, etc. I've broken out a second step to this process in #1439 which actually cuts over the names to the new `ffi` naming, but as this is a breaking change we'll need to ensure that all downstream sdks do this update in lock step. We can also choose to not merge this second step if it is going to be too disruptive and the resulting naming debt is deemed acceptable. ## TODO - [x] Fix the dual versions of prost (`prost` vs `prost_012`) which seem to have made their way in because `livekit-ffi` and `livekit-uniffi` had different versions in use. Standardize on whatever the repo uses generally. - This has been done and broken out into a separate PR (#1447) - [x] Rebase on top of `main` once #1447 merged.
…FI identity Every commit before this one keeps the names that the Swift, Android and Flutter SDKs use today. This commit changes them, and it is the only commit that does. Hold it back or move it to its own pull request if the rename is not wanted now. The Swift package and product become LiveKitFFI and RustLiveKitFFI. The Maven artifact becomes io.livekit:livekit-ffi-android with the Kotlin package io.livekit.ffi. The package on pub.dev becomes livekit_ffi. Both surfaces now use the crate name as their UniFFI namespace. Rename the podspec template with the package. The cargo-make task builds its file name from the package name, so the old name would stop the Swift release with a missing template. The repository that holds the Swift framework keeps its current name. Only the package and the product inside it change. BREAKING CHANGE: imports, dependency coordinates and generated module names all change together for the Swift, Android and Flutter SDKs. Before the first release, publish livekit_ffi to pub.dev by hand and set its tag pattern, because pub.dev automates only a package that exists. Also remove the old source directory from the framework repository.
`export FLAGS=$(...)` is a builtin whose own exit status is 0, so `set -e` never saw `ffi_features.py` fail. FLAGS would be empty and the build fell through to `cargo build -p livekit-ffi` with no feature flags -- the default feature set, room-apis -- quietly producing the wrong surface and publishing it to pub.dev as the Dart cdylib. Splitting the assignment from the export restores the check: a plain assignment carries the command substitution's status, so the step now aborts before `docker run`. Verified both paths: a failing resolver exits 2 without reaching the docker step, and the success path still exports `--no-default-features --features core-modules` into the container. This was the only affected call site. The other invocations here and in livekit-ffi/Makefile.toml already use a plain assignment, and cargo-make's `@shell` runner does propagate a failed command substitution (checked against cargo-make 0.37.24). Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
24b8f51 to
cc45089
Compare
The Rust core package moved to the `livekit-ffi` crate (livekit/rust-sdks#1438, livekit/rust-sdks#1439) and is now published on pub.dev as `livekit_ffi`. This swaps the dependency from `livekit_uniffi: ^0.2.2` to `livekit_ffi: ^0.13.1`. Five commits: 1. **Replace livekit_uniffi with livekit_ffi ^0.13.0**: pubspec, lockfile, the import in the native facade, and the crate/release/path names in `AGENTS.md`. The local override path is now `../rust-sdks/livekit-ffi/packages/dart`. The pending `uniffi-rust-core-dev-wiring` changeset is reworded instead of adding a new one, since #1160 has not shipped yet. 2. **Rename the uniffi facade files to ffi**: `lib/src/uniffi/` becomes `lib/src/ffi/` and `test/uniffi/` becomes `test/ffi/`. Pure rename plus reference updates. 3. **Rename LiveKitUniffi to LiveKitFfi**: the facade class is still unreleased, so it follows the package name now rather than after it ships. 4. **Rename LiveKitFfi to LiveKitFFI**: follows the all-caps acronym style of the existing public API (`E2EEManager`, `LiveKitE2EEException`). 5. **Bump livekit_ffi to ^0.13.1**: picks up the latest release. ## Testing - `livekit_ffi` 0.13.1 is on pub.dev under the livekit.io publisher, and the `livekit-ffi/v0.13.1` release carries all 12 `build-<triple>.zip` assets with sha256 sidecars. - `flutter analyze`: no issues. - `flutter test`: 457 pass, including `test/ffi` against the hook-downloaded library. - `flutter build macos --release` of the example: `livekit_ffi.framework` is a fat binary (x86_64 + arm64). --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Adds onto the base livekit-ffi / livekit-uniffi merge pull request and renames a bunch of lagging symbols from "uniffi" to be "ffi". This is the breaking part of this change. We decided it makes most sense to merge both parts right after another.